<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Space Battle: C:/Documents and Settings/Administrateur/Mes documents/space-battle-insa/SpaceBattleDev/Headers/Modele/Flotte.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Space Battle
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">C:/Documents and Settings/Administrateur/Mes documents/space-battle-insa/SpaceBattleDev/Headers/Modele/Flotte.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 ﻿
<a name="l00009"></a>00009 <span class="preprocessor">#pragma once</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define WANTDLLEXP</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#ifdef WANTDLLEXP       //exportation dll</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">        #define DLL  __declspec( dllexport )</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">        #define EXTERNC extern &quot;C&quot;</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">        #define DLL             //standard</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">        #define EXTERNC</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="_couleur_8h.html" title="Énumération Couleur.">Couleur.h</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;Vaisseau.h&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;VaisseauMere.h&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;FabriqueVaisseau.h&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="keyword">using namespace </span>std;
<a name="l00027"></a>00027 
<a name="l00032"></a><a class="code" href="class_flotte.html">00032</a> <span class="keyword">class </span><a class="code" href="class_flotte.html">Flotte</a> {
<a name="l00033"></a>00033 <span class="keyword">public</span>:
<a name="l00034"></a><a class="code" href="class_flotte.html#ac1f1ebf8621449c5e6c5a16786fbbe57">00034</a>         Couleur <a class="code" href="class_flotte.html#ac1f1ebf8621449c5e6c5a16786fbbe57">_couleur</a>;                               
<a name="l00035"></a><a class="code" href="class_flotte.html#ab8a082f76fcd5379db176aa1603ff44b">00035</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_flotte.html#ab8a082f76fcd5379db176aa1603ff44b">_idxVC</a>;                    
<a name="l00036"></a><a class="code" href="class_flotte.html#ad779d685447d54b19c145dfd793634c5">00036</a>         vector&lt;Vaisseau*&gt; <a class="code" href="class_flotte.html#ad779d685447d54b19c145dfd793634c5">_vaisseaux</a>;   
<a name="l00038"></a>00038 <span class="keyword">public</span>:
<a name="l00043"></a>00043         <a class="code" href="class_flotte.html">Flotte</a>(Couleur c);
<a name="l00044"></a>00044         
<a name="l00050"></a><a class="code" href="class_flotte.html#a51b5e74561d9d6c74c07d7b70dd7fbde">00050</a>         Couleur <a class="code" href="class_flotte.html#a51b5e74561d9d6c74c07d7b70dd7fbde" title="Getter pour l&#39;attribut _couleur.">getCouleur</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _couleur; };
<a name="l00051"></a>00051 
<a name="l00057"></a>00057         <a class="code" href="class_vaisseau.html">Vaisseau</a>* getVaisseau() <span class="keyword">const</span>;
<a name="l00058"></a>00058 
<a name="l00064"></a><a class="code" href="class_flotte.html#a38aae8881481138737c249390ff43283">00064</a>         <span class="keywordtype">void</span> <a class="code" href="class_flotte.html#a38aae8881481138737c249390ff43283" title="Setter pour l&#39;attribut _couleur.">setCouleur</a>(Couleur c) { _couleur = c; };
<a name="l00065"></a>00065 
<a name="l00071"></a>00071         <span class="keywordtype">bool</span> detruireVaisseau();
<a name="l00072"></a>00072 };
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 <span class="keywordtype">int</span> main() {
<a name="l00075"></a>00075         <a class="code" href="class_flotte.html">Flotte</a>* f = <span class="keyword">new</span> <a class="code" href="class_flotte.html">Flotte</a>(ROUGE);
<a name="l00076"></a>00076 
<a name="l00077"></a>00077         <a class="code" href="class_vaisseau.html">Vaisseau</a>* v = f-&gt;<a class="code" href="class_flotte.html#a2b7e6ef925d8c0d0b210640d38d01dc3" title="Donne le vaisseau en cours d&#39;utilisation.">getVaisseau</a>();
<a name="l00078"></a>00078         <span class="keywordflow">if</span> (v != NULL)
<a name="l00079"></a>00079                 cout &lt;&lt; <span class="stringliteral">&quot;Vaisseau aux coordonnees &quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#a5aeb911213529c462fca9e262bd13ead" title="Getter pour l&#39;attribut _x.">getX</a>() &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#aa7a14678ac9285a72c6843cbf3eb8799" title="Getter pour l&#39;attribut _y.">getY</a>() &lt;&lt; endl;
<a name="l00080"></a>00080         <span class="keywordflow">else</span>
<a name="l00081"></a>00081                 cout &lt;&lt; <span class="stringliteral">&quot;Dommage, plus de vaisseaux&quot;</span> &lt;&lt; endl;
<a name="l00082"></a>00082         (<a class="code" href="class_vaisseau_mere.html">VaisseauMere</a>* v)-&gt;prendreArtefact();
<a name="l00083"></a>00083         cout &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#a781592e2c53e3d347a2bee7735528a5e" title="Getter pour l&#39;attribut _hasArtefact.">hasArtefact</a>() &lt;&lt; endl;
<a name="l00084"></a>00084         cout &lt;&lt; f-&gt;<a class="code" href="class_flotte.html#a8b23ce834aa351f436c054ba6ee492ba" title="Detruit le vaisseau en cours d&#39;utilisation.">detruireVaisseau</a>() &lt;&lt; endl;
<a name="l00085"></a>00085 
<a name="l00086"></a>00086         v = f-&gt;<a class="code" href="class_flotte.html#a2b7e6ef925d8c0d0b210640d38d01dc3" title="Donne le vaisseau en cours d&#39;utilisation.">getVaisseau</a>();
<a name="l00087"></a>00087         <span class="keywordflow">if</span> (v != NULL)
<a name="l00088"></a>00088                 cout &lt;&lt; <span class="stringliteral">&quot;Vaisseau aux coordonnees &quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#a5aeb911213529c462fca9e262bd13ead" title="Getter pour l&#39;attribut _x.">getX</a>() &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#aa7a14678ac9285a72c6843cbf3eb8799" title="Getter pour l&#39;attribut _y.">getY</a>() &lt;&lt; endl;
<a name="l00089"></a>00089         <span class="keywordflow">else</span>
<a name="l00090"></a>00090                 cout &lt;&lt; <span class="stringliteral">&quot;Dommage, plus de vaisseaux&quot;</span> &lt;&lt; endl;
<a name="l00091"></a>00091         cout &lt;&lt; f-&gt;<a class="code" href="class_flotte.html#a8b23ce834aa351f436c054ba6ee492ba" title="Detruit le vaisseau en cours d&#39;utilisation.">detruireVaisseau</a>() &lt;&lt; endl;
<a name="l00092"></a>00092 
<a name="l00093"></a>00093         v = f-&gt;<a class="code" href="class_flotte.html#a2b7e6ef925d8c0d0b210640d38d01dc3" title="Donne le vaisseau en cours d&#39;utilisation.">getVaisseau</a>();
<a name="l00094"></a>00094         <span class="keywordflow">if</span> (v != NULL)
<a name="l00095"></a>00095                 cout &lt;&lt; <span class="stringliteral">&quot;Vaisseau aux coordonnees &quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#a5aeb911213529c462fca9e262bd13ead" title="Getter pour l&#39;attribut _x.">getX</a>() &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#aa7a14678ac9285a72c6843cbf3eb8799" title="Getter pour l&#39;attribut _y.">getY</a>() &lt;&lt; endl;
<a name="l00096"></a>00096         <span class="keywordflow">else</span>
<a name="l00097"></a>00097                 cout &lt;&lt; <span class="stringliteral">&quot;Dommage, plus de vaisseaux&quot;</span> &lt;&lt; endl;
<a name="l00098"></a>00098         cout &lt;&lt; f-&gt;<a class="code" href="class_flotte.html#a8b23ce834aa351f436c054ba6ee492ba" title="Detruit le vaisseau en cours d&#39;utilisation.">detruireVaisseau</a>() &lt;&lt; endl;
<a name="l00099"></a>00099 
<a name="l00100"></a>00100         v = f-&gt;<a class="code" href="class_flotte.html#a2b7e6ef925d8c0d0b210640d38d01dc3" title="Donne le vaisseau en cours d&#39;utilisation.">getVaisseau</a>();
<a name="l00101"></a>00101         <span class="keywordflow">if</span> (v != NULL)
<a name="l00102"></a>00102                 cout &lt;&lt; <span class="stringliteral">&quot;Vaisseau aux coordonnees &quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#a5aeb911213529c462fca9e262bd13ead" title="Getter pour l&#39;attribut _x.">getX</a>() &lt;&lt; <span class="stringliteral">&quot;,&quot;</span> &lt;&lt; v-&gt;<a class="code" href="class_vaisseau.html#aa7a14678ac9285a72c6843cbf3eb8799" title="Getter pour l&#39;attribut _y.">getY</a>() &lt;&lt; endl;
<a name="l00103"></a>00103         <span class="keywordflow">else</span>
<a name="l00104"></a>00104                 cout &lt;&lt; <span class="stringliteral">&quot;Dommage, plus de vaisseaux&quot;</span> &lt;&lt; endl;
<a name="l00105"></a>00105         cout &lt;&lt; f-&gt;<a class="code" href="class_flotte.html#a8b23ce834aa351f436c054ba6ee492ba" title="Detruit le vaisseau en cours d&#39;utilisation.">detruireVaisseau</a>() &lt;&lt; endl;
<a name="l00106"></a>00106 
<a name="l00107"></a>00107         system(<span class="stringliteral">&quot;pause&quot;</span>);
<a name="l00108"></a>00108         <span class="keywordflow">return</span> 0;
<a name="l00109"></a>00109 }
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 11 2012 23:30:05 for Space Battle by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
